void *GpsRethread(void *arg)
{
	GpsReThreadFlag=TRUE;
	while(GpsReThreadFlag)
	{
		usleep(10);
		GpsRePro();
	}
}

void GpsRePro()
{
	u8 str[1024];
	u8 flag7e[3];
	int i,k,ret,start,end;
	if(m_GpsStatu!=GPSSTATU_OPENED)
	{
		return;
	}						
	ret=SerialRead(GpsDev_fd,str,1024);//$GPRMC,024813.640,A,3158.4608,N,11848.3737,E,10.05,324.27,150706,,,A*50
	if(ret>0)
	{		
		if((GpsReLen+ret)>=GPSREBUFFMAX)
		{
			GpsReLen=0;
		}
		memcpy(GpsReBuff+GpsReLen,str,ret);
		GpsReLen+=ret;
		for(i=0,k=0;i<GpsReLen;i++)
		{
			if(GpsReBuff[i]==0x7e)
			{
				flag7e[k++]=i;
				if(k>=2)
				{
					break;
				}
			}
		}
		if(k>=2)
		{
			GpsDataPro(GpsReBuff+flag7e[0],flag7e[1]-flag7e[0]+1);
			GpsReLen=0;
		}

	}						

}

#define GPSREBUFFMAX				2*1024
u8 GpsReBuff[GPSREBUFFMAX];
u32 GpsReLen;